<div class="breadcrum">
    <p>
        <a href="{$config->site_url('laporan/barang')}">Reporting</a>
        <span></span>
        <small>Lokasi</small>
    </p>
    <div class="clear"></div>
</div>

<div class="sub-content">   
    <!-- notification template -->
    {include file="base/templates/notification.html"}
    <!-- end of notification template--> 
    <table width="100%" class="table-dashboard">
        <tbody>
            <tr>
                <tr>
                <th width="40%">Lokasi</th>
                <th width="30%">Jumlah Asset</th>
                <th width="30%">Total Nilai Asset</th>
            </tr>
            {assign var='numb' value=1}
            {assign var="tot_jum" value= 0}
            {assign var="tot_nilai" value=0}
            {foreach from=$rs_id key=no item=result}

            {assign var="tot_jum" value=$tot_jum+$result.total_barang}
            {assign var="tot_nilai" value=$tot_nilai+$result.total_nilai_buku}
            
        
            <tr {if ($no % 2) <> 0}class="blink-row"{/if}{$numb++}>
                <td class="group">
                    <a href="{$config->site_url('laporan/barang/barang_per_lokasi_detail/')}/{$result.lokasi_cd}">
                        <span class="blue">{$result.lokasi_name|default:''}</span></a>
                </td>
                <td align="left"><span class="count">{$result.total_barang|default:'0'}</span><span class="label">Barang</span></td> 
                <td align="right"><span class="count">{$result.total_nilai_buku|default:'0'|number_format:2:",":"."}</span><span class="label">Rupiah</span></td>               
            </tr>
            {foreachelse}
            <tr>
                <td colspan="3">Data masih kosong</td>
            </tr>
            {/foreach}
            {if $numb neq '1'}
            <tr>
                <td  align="right" class="group" style="color:#CC181E;"><b>Total</b></td>
                <td  align="left"><span class="count" style="color:#CC181E;">{$tot_jum|default:'0'}</span><span class="label">Barang</span></td>
                <td  align="right"><span class="count" style="color:#CC181E;">{$tot_nilai|default:'0'|number_format:2:",":"."}</span><span class="label">Rupiah</span></td>
            </tr>
            {/if}
        </tbody>
    </table> 
</div>